<script language="JavaScript">
function f_setGrid() {
	var masterObj = window.top.document.frames(0);

	var parentPageType = "grid";
	if (parent.document.location.href.indexOf("contract") >= 0) {
		parentPageType = parent.document.all("pageType")[0].value;
	}

	if (parentPageType.indexOf("query") == -1) masterObj.frames[0].f_form();
}
</script>